# 计数器

def generate_counter():
    container = [0]

    def add_one():
        container[0] = container[0] + 1
        msg = "当前是第{}次访问".format(container[0])
        print(msg)

    return add_one


x = generate_counter()

x()
x()
x()
